import request from '@/lib/request';

export function login (data) {
  const urls = 'api/account/login?ReturnUrl=' + data['ReturnUrl'];
  return request({
    baseURL: 'https://localhost:44321',
    url: urls,
    method: 'post',
    data: data
  });
}

export function getConfigJSON () {
  return request({
    baseURL: '/',
    url: 'web_config/config.js?random=' + new Date().toString(),
    method: 'get'
  });
}

export function logout () {
  return request({
    url: '/vue-admin-template/user/logout',
    method: 'post'
  });
}

export function getRouter () {
  return request({
    url: '/vue-admin-template/user/permissions',
    method: 'get'
  });
}
